<div id="tertiaryHeader">
    <div id="tertiary-header-container">
        <div class="tabBar tabBar-profile">
            <div class="tabsC">
                <table id="mobile-user-tabs" style="width: 100%; margin-bottom: 1em; margin-top: 0.5em">
                    <tr>
                        <td style="text-align: left">
                            <a id="stats" {% if tab_name=="stats" %}class="on first"{%else%}class="first"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=stats"
                             style="padding: 4px 7px;"><span>{% trans %}overview{% endtrans %}</span></a><br> 
                        {% if request.user == view_user or request.user|can_moderate_user(view_user) %}                            
                            <a id="inbox" {% if tab_name=="inbox" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=inbox"
                            ><span>{% trans %}inbox{% endtrans %}</span></a><br>
                        
                        {% endif %}
                        {% if user_follow_feature_on %}
                        
                            <a id="network" {% if tab_name=="network" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=network"
                            ><span>{% trans %}network{% endtrans %}</span></a><br>
                        
                        {% endif %}
                        {% if can_show_karma %}
                        
                            <a id="reputation" {% if tab_name=="reputation" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=reputation"
                            ><span>{% trans %}karma{% endtrans %}</span></a><br>
                        
                        {% endif %}
                        
                            <a id="favorites" {% if tab_name=="favorites" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=favorites"
                            ><span>{{ settings.WORDS_FOLLOWED_QUESTIONS|escape }}</span></a>
                        </td>
                        <td style="text-align: left; vertical-align: top">
                            <a id="recent" {% if tab_name=="recent" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=recent"
                            ><span>{% trans %}activity{% endtrans %}</span></a><br>
                        
                            {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                            <a id="votes" {% if tab_name=="votes" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=votes"
                            ><span>{% trans %}votes{% endtrans %}</span></a><br>
                            {% endif %}
          
                            {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                            <a id="email_subscriptions" {% if tab_name=="email_subscriptions" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=email_subscriptions"
                            ><span>{% trans %}subscriptions{% endtrans %}</span></a><br>
                            {% endif %}
                        
                            {% if request.user|can_moderate_user(view_user) %}
                            <a id="moderation" {% if tab_name=="moderation" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=moderation"
                            ><span>{% trans %}moderation{% endtrans %}</span></a><br>
                            {% endif %}
                        
                            {% if custom_tab_slug %}
                            <a id="{{ custom_tab_slug }}" {% if tab_name == custom_tab_slug %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort={{ custom_tab_slug }}"
                            ><span>{{ custom_tab_name }}</span></a>
                            {% endif %}
                        </td>
                    </tr>
                </table>
                <table id="tab-user-tabs" style="width: 100%; margin-bottom: 1em; margin-top: 0.5em">
                    <tr>
                        <td style="text-align: left; width: 33.33%">
                            <a id="stats" {% if tab_name=="stats" %}class="on first"{%else%}class="first"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=stats"
                             style="padding: 4px 7px;"><span>{% trans %}overview{% endtrans %}</span></a><br>                            
                        {% if request.user == view_user or request.user|can_moderate_user(view_user) %}                           
                            <a id="inbox" {% if tab_name=="inbox" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=inbox"
                            ><span>{% trans %}inbox{% endtrans %}</span></a><br>
                        
                        {% endif %}
                        {% if user_follow_feature_on %}                           
                            <a id="network" {% if tab_name=="network" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=network"
                            ><span>{% trans %}network{% endtrans %}</span></a><br>
                        
                        {% endif %}                            
                        </td>
                        <td style="text-align: left; vertical-align: top; width: 33.33%">
                            {% if can_show_karma %}                            
                                <a id="reputation" {% if tab_name=="reputation" %}class="on"{% endif %} 
                                    href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=reputation"
                                ><span>{% trans %}karma{% endtrans %}</span></a><br>
                        
                            {% endif %}                            
                            <a id="favorites" {% if tab_name=="favorites" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=favorites"
                            ><span>{{ settings.WORDS_FOLLOWED_QUESTIONS|escape }}</span></a><br>

                            <a id="recent" {% if tab_name=="recent" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=recent"
                            ><span>{% trans %}activity{% endtrans %}</span></a>
                        </td>
                        <td style="text-align: left; vertical-align: top; width: 33.33%">
                         
                            {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                            <a id="votes" {% if tab_name=="votes" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=votes"
                            ><span>{% trans %}votes{% endtrans %}</span></a><br>
                            {% endif %}                            
                            {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                            <a id="email_subscriptions" {% if tab_name=="email_subscriptions" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=email_subscriptions"
                            ><span>{% trans %}subscriptions{% endtrans %}</span></a><br>
                            {% endif %}
                        
                            {% if request.user|can_moderate_user(view_user) %}
                            <a id="moderation" {% if tab_name=="moderation" %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=moderation"
                            ><span>{% trans %}moderation{% endtrans %}</span></a><br>
                            {% endif %}
                        
                            {% if custom_tab_slug %}
                            <a id="{{ custom_tab_slug }}" {% if tab_name == custom_tab_slug %}class="on"{% endif %} 
                                href="{% url user_profile view_user.id, view_user.username|slugify %}?sort={{ custom_tab_slug }}"
                            ><span>{{ custom_tab_name }}</span></a>
                            {% endif %}
                        </td>
                    </tr>
                </table>
                <div id="desktop-user-tabs" style="width: 100%">
                    <div class="desktop-user-links">
                        <a id="stats" {% if tab_name=="stats" %}class="on first"{%else%}class="first"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=stats"
                        ><span>{% trans %}overview{% endtrans %}</span></a>
                    </div>
                    {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                    <div class="desktop-user-links">
                        <a id="inbox" {% if tab_name=="inbox" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=inbox"
                        ><span>{% trans %}inbox{% endtrans %}</span></a>
                    </div>
                    {% endif %}
                    {% if user_follow_feature_on %}
                    <div class="desktop-user-links">
                        <a id="network" {% if tab_name=="network" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=network"
                        ><span>{% trans %}network{% endtrans %}</span></a>
                    </div>
                    {% endif %}
                    {% if can_show_karma %}
                    <div class="desktop-user-links">
                        <a id="reputation" {% if tab_name=="reputation" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=reputation"
                        ><span>{% trans %}karma{% endtrans %}</span></a>
                    </div>
                    {% endif %}
                    <div class="desktop-user-links">
                        <a id="favorites" {% if tab_name=="favorites" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=favorites"
                        ><span>{{ settings.WORDS_FOLLOWED_QUESTIONS|escape }}</span></a>
                    </div>
                    <div class="desktop-user-links">
                        <a id="recent" {% if tab_name=="recent" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=recent"
                        ><span>{% trans %}activity{% endtrans %}</span></a>
                    </div>
                    <div class="desktop-user-links">
                        {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                        <a id="votes" {% if tab_name=="votes" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=votes"
                        ><span>{% trans %}votes{% endtrans %}</span></a>
                        {% endif %}
                    </div>
                    <div class="desktop-user-links">
                        {% if request.user == view_user or request.user|can_moderate_user(view_user) %}
                        <a id="email_subscriptions" {% if tab_name=="email_subscriptions" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=email_subscriptions"
                        ><span>{% trans %}subscriptions{% endtrans %}</span></a>
                        {% endif %}
                    </div>  
                    <div class="desktop-user-links">
                        {% if request.user|can_moderate_user(view_user) %}
                        <a id="moderation" {% if tab_name=="moderation" %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=moderation"
                        ><span>{% trans %}moderation{% endtrans %}</span></a>
                        {% endif %}
                    </div>
                    <div class="desktop-user-links">
                        {% if custom_tab_slug %}
                        <a id="{{ custom_tab_slug }}" {% if tab_name == custom_tab_slug %}class="on"{% endif %} 
                            href="{% url user_profile view_user.id, view_user.username|slugify %}?sort={{ custom_tab_slug }}"
                        ><span>{{ custom_tab_name }}</span></a>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
        <div class="clean"></div>
    </div>
</div>
